package com.usian.config;

import com.usian.pojo.Product;
import com.usian.pojo.Supply;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "springclound-priest")
public interface FeignProduct {
    @RequestMapping("/product/findAll")
    public List<Product> findAll(@RequestBody Product product);
    @RequestMapping("/product/findAllss")
    public List<Supply> findAllss();
    @PostMapping("/product/insert")
    public ResponseResult insert(@RequestBody Product product);
    @PostMapping("/product/update")
    public ResponseResult update(@RequestBody Product product);
    @PostMapping("/product/delete")
    public ResponseResult delete(@RequestParam("id") Integer id);
    @GetMapping("/product/findByid")
    public Product findByid(@RequestParam("id") Integer id);
}
